package com.sgb.kjwl.api.service;

import com.sgb.kjwl.model.entity.manage.AliVideoBean;
import com.sgb.kjwl.model.entity.pick.EnterpriseBiddingJoinEntity5;
import com.sgb.kjwl.model.entity.user.AuthPhotoEntity;
import com.swgk.core.base.model.entity.BaseEntity;
import com.swgk.core.base.model.factory.BaseUrlInterceptor;

import java.util.List;
import java.util.Map;

import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.PartMap;
import retrofit2.http.Query;

public interface UploadAPI {
    //提交营业执照图片的url，返回执照信息
    @Multipart
    @POST("v1/app/user/identification/readLicenseInfo")
    Call<BaseEntity<AuthPhotoEntity>> uploadPhoto(@PartMap Map<String, RequestBody> photos);

    //上传单个文件
    @Multipart
    @POST("v1/app/common/fileUpload")
    Call<BaseEntity> uploadFile(@PartMap Map<String, RequestBody> files);
    /*   //上传单个文件 商品专用
       @Multipart
       @POST("v1/app/common/fileUploadV1")
       Call<BaseEntity> uploadFileV1(@PartMap Map<String, RequestBody> files);*/
    //上传单个文件，支持点击链接浏览器下载
    @Multipart
    @POST("v1/app/common/addFile")
    Call<BaseEntity> addFile(@PartMap Map<String, RequestBody> files);
    @Multipart
    @POST("v1/app/common/mutiFileUpload")
    Call<BaseEntity<List<String>>> uploadFileV1(@PartMap Map<String, RequestBody> files);

    //上传多个文件
    @Multipart
    @POST("file/addFiles")
    Call<BaseEntity<List<String>>> uploadMutiFile(@PartMap Map<String, RequestBody> files);

    //上传多个文件
    @Multipart
    @POST("v1/app/common/mutiFileUploadOrderly")
    Call<BaseEntity<List<String>>> uploadMutiFileDrive(@PartMap Map<String, RequestBody> files);


    // 招标大厅- 竞价数据提交接口，由于提交数据比较多，响应时间过长，故使用此长响应时间
    @POST("v1/app/bid/postOffer")
    Call<BaseEntity> publishBidding(@Body EnterpriseBiddingJoinEntity5 enterpriseBiddingJoinEntity5);

    //报名申请添加
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v3/app/recruit/addTenderBidApply")
    Call<BaseEntity> addTenderBidApply(@Body EnterpriseBiddingJoinEntity5 enterpriseBiddingDetailEntity5);

    //报名
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v3/app/recruit/saveApply")
    Call<BaseEntity> saveApply(@Body EnterpriseBiddingJoinEntity5 enterpriseBiddingEntity);

    //报名&投标-简易招标
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v3/app/recruit/saveApplyForEasy")
    Call<BaseEntity> saveApplyForEasy(@Body EnterpriseBiddingJoinEntity5 enterpriseBiddingDetailEntity5);

    //个人中心接口(上传头像)
    @Multipart
    @POST("v1/app/userInfo/avaterUpload")
    Call<BaseEntity> uploadImg(@PartMap Map<String, RequestBody> files);

    //通过视频id获取视频地址
    @GET("v1/app/site/admin/companyAlbum/getPalyUrl")
    @Headers("tokenType:pc")
    Call<BaseEntity<AliVideoBean>> getVideoUrlById(@Query("videoId") String id);

}
